package cn.topevery.garden.entity.vo.event;

import cn.topevery.garden.entity.po.event.EventInfoFile;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yong.chen
 * @date 2020/9/15
 * @description 环节实例详情
 */

@ApiModel(description = "环节实例详情")
public class ActivityInstanceVO {

    @ApiModelProperty("环节ID")
    public String activityInstanceId;
    @ApiModelProperty("环节编码")
    public String code;
    @ApiModelProperty("工作流实例ID")
    public String workflowInstanceId;
    @ApiModelProperty("上一个环节ID")
    public String prevActivityInstanceId;
    @ApiModelProperty("环节名称")
    public String activityName;
    @ApiModelProperty("环节标识")
    public String activityIdentifier;
    @ApiModelProperty("工作流定义ID")
    public String workflowId;
    @ApiModelProperty("来件人名称")
    public String inUserName;
    @ApiModelProperty("来件人ID")
    public String inUserId;

    @ApiModelProperty("来件时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime inDate;

    @ApiModelProperty("用户 100601, 角色 100602, 部门 100603, 其它100604,")
    public int receiveTypeId;
    @ApiModelProperty("接收对象名称")
    public String receiveObjectName;
    @ApiModelProperty("接收对象ID")
    public String receiveObjectId;
    @ApiModelProperty("签收人名称")
    public String signedUserName;
    @ApiModelProperty("签收人ID")
    public String signedUserId;

    @ApiModelProperty("签收时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime signedDate;

    @ApiModelProperty("告警时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime alertDate;

    @ApiModelProperty("办结时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime finishedDate;

    @ApiModelProperty("应完成时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime shouldFinishedDate;

    @ApiModelProperty("操作人ID")
    public String operatorId;
    @ApiModelProperty("操作人")
    public String operatorName;
    //FIXME 框架bug 注释上说，1是退件，2是撤件；实际上2是退件，3是撤件
    @ApiModelProperty("0：正常，2：被退件，3：主动撤件")
    public int fromStatus;
    @ApiModelProperty("0：未办理 Default = 0, 正常办理 Normal = 1, 退件 Untread = 2, 被撤件Revoke = 3, 取消 Cancel = 4 停止  Stop = 5, 新启动Reboot = 6,")
    public int handlerStatus;
    @ApiModelProperty("环节用时(秒)")
    public int usedTime;
    @ApiModelProperty("环节用时描述")
    public String usedTimeStr;
    @ApiModelProperty("环节时限(秒)")
    public int limit;
    @ApiModelProperty("是否超时：0：否，1：是")
    public byte isTimeout;
    @ApiModelProperty("附件数量")
    public int attachCount;
    @ApiModelProperty("来件环节实例id")
    public String fromInstanceId;
    @ApiModelProperty("办理意见")
    public String content;
    @ApiModelProperty("0:正常环节,1:历史环节(即被撤件，或主动退件),2同步子流程，3异步子流程")
    public int status;
    @ApiModelProperty("时限")
    public BigDecimal limitValue;
    @ApiModelProperty("时限字符")
    public String limitStr;
    @ApiModelProperty("时限类型")
    public int limitType;


    @ApiModelProperty("超时时间")
    public String outTimeStr;
    @ApiModelProperty("超时时间：单位秒")
    public int outTime;
    @ApiModelProperty("环节附件")
    public List<EventInfoFile> taskFiles;
}
